import os


class Config:
    def __init__(self):
        self.WTF_CSRF_ENABLED = os.getenv("WTF_CSRF_ENABLED", "False").lower() == "true"

        self.SQLALCHEMY_DATABASE_URI = os.getenv("SQLALCHEMY_DATABASE_URI")
        self.SQLALCHEMY_ENGINE_OPTIONS = {
            "pool_size": int(os.getenv("SQLALCHEMY_ENGINE_POOL_SIZE", 30)),
            "pool_recycle": int(os.getenv("SQLALCHEMY_POOL_SIZE", 3600)),
        }
        self.SQLALCHEMY_ECHO = os.getenv("SQLALCHEMY_ECHO", "False").lower() == "true"
